library(MASS)
simulate <- function(n, mu, Sigma) {
  sims <- mvrnorm(n=n, mu=mu, Sigma=Sigma) #Simulate
  #Vote
  sims <- exp(sims) #Transforma en %
  sims <- apply(sims, 2, function(x) x/(1+rowSums(sims)))
  sims <- cbind(sims, OTH=1-rowSums(sims))
  mean.vote <- apply(sims, 2, mean)
  #Seats
  is.max <- apply(sims, 1,function(x) max(x)==x) #Ganador
  seats <- rowSums(is.max)
  return(list("out"=sims, "mean.vote"=mean.vote, "seats"=seats))
}